﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;

namespace EFExtention.Common.Utils {
    public static class BindingListExtensions {
        public static void FireListChanged<T>(this BindingList<T> list, ListChangedType type, int index) {
            MethodInfo fireListChangedMethod = typeof(BindingList<T>).GetMethod("FireListChanged", BindingFlags.NonPublic | BindingFlags.Instance);
            fireListChangedMethod.Invoke(list, new object[] { type, index });
        }
    }
}
